export let PDAFORM = {
  name: '界面逻辑',
  list: [
    {
      name: '必输验证',
      event: 'pdaValidateForm',
      explain: '触发表单组件的验证动作，当选择的表单组件全部验证通过才会执行下一个动作，否则不执行下一个动作。传递数据为空。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiPdaForm',
        },
      },
    },
    {
      name: '获取表单值',
      event: 'pdaGetFormData',
      explain:
        '获取表单组件的 formData ，选中多个表单组件时会将多个表单组件的值进行合并，若有相同 key 则后面组件的值会覆盖前面组件的值。传递数据为组合后的数据对象。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiPdaForm',
        },
        getDataKey: {
          name: '获取数据Key',
          type: 'exInput',
          value: '',
          tooltip: '通过 key 筛选数据；多个 key 用 ‘,’ 分隔。',
        },
        injectDataKey: {
          name: '注入数据key',
          type: 'exInput',
          value: '',
          tooltip: '通过 key 筛选数据修改字段名字；多个 key 用 ‘,’ 分隔。对应获取数据key',
        },
      },
    },

    {
      name: '清空表单',
      event: 'pdaFormClear',
      explain: '将表单组件的 formData 清空，有设置默认值的表单项会赋值为默认值。无传递数据。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiForm',
        },
      },
    },
    {
      name: '清空组件',
      event: 'pdaFormItemReset',
      explain: '将所选表单项组件的值清空（若有配置默认值则会赋值为默认值），表单项组件所属的表单组件的 formData 也会做相应改变。无传递数据',
      extension: {
        formItemSelect: {
          type: 'exPdaTreeSelect',
          name: '表单项选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
        notUseDefaultVal: {
          type: 'exSwitch',
          name: '彻底清空',
          value: false,
        },
      },
    },
    {
      name: '分页器获取数据',
      event: 'pdaGetPageData',
      explain: '',
      extension: {
        paginationSelect: {
          type: 'exTreeSelect',
          name: '分页器选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: ['uiPdaPagination'],
          tooltip: '获取当前分页器上一页或者下一页数据',
        },
      },
    },

    {
      name: '分页器匹配数据',
      event: 'pdaMatchPageData',
      explain: '',
      extension: {
        matchFromDataKey: {
          name: '来源匹配字段ID',
          type: 'exInput',
          value: '',
          tooltip: '通过 id 筛选数据',
        },
        matchToDataKey: {
          name: '目标匹配字段ID',
          type: 'exInput',
          value: '',
          tooltip: '通过 id 筛选数据',
        },
        paginationSelect: {
          type: 'exTreeSelect',
          name: '分页器选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: ['uiPdaPagination'],
          tooltip: '获取当前分页器上一页或者下一页数据',
        },
      },
    },

    {
      name: '组件隐藏',
      event: 'hidenBatch',
      explain: '将pda表单项组件(主要批次属性)状态切换为隐藏状态。无传递数据。',
      extension: {
        moduleId: {
          type: 'exPdaTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '组件显示',
      event: 'showModule',
      explain: '将表单项组件状态切换为显示状态。无传递数据。',
      extension: {
        moduleId: {
          type: 'exPdaTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '组件禁用',
      event: 'disabledModule',
      explain: '将表单项组件状态切换为禁用状态。无传递数据。',
      extension: {
        moduleId: {
          type: 'exPdaTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '组件启用',
      event: 'enableModule',
      explain: '将表单项组件状态切换为启用状态。无传递数据。',
      extension: {
        moduleId: {
          type: 'exPdaTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '获取卡片值',
      event: 'pdaGetCardData',
      explain: '',
      extension: {
        useInpData: {
          type: 'exSwitch',
          value: true,
          name: '获取卡片值',
        },
        getDataKey: {
          name: '获取卡片数据Key',
          type: 'exInput',
          value: '',
          tooltip: '通过 key 筛选数据；多个 key 用 ‘,’ 分隔。',
        },
      },
    },
    {
      name: '多选获取卡片值',
      event: 'pdaGetCardCheck',
      explain: '获取多选之后的卡片值',
      extension: {
        cardSelect: {
          type: 'exPdaTreeSelect',
          name: '卡片选择',
          value: [],
          hasCheckbox: false,
          treeData: '$getPageModules',
          filter: ['uiPdaCard'],
        },
        getDataKey: {
          name: '获取卡片数据Key',
          type: 'exInput',
          value: '',
          tooltip: '通过 key 筛选数据；多个 key 用 ‘,’ 分隔。',
        },
        emptyMsg: {
          name: '错误提示',
          type: 'exInput',
          value: '请选择卡片数据',
          tooltip: '未选择卡片式、消息提示',
        },
      },
    },
    {
      name: '选项卡激活tab',
      event: 'pdaTabsActive',
      explain: '选项卡激活到指定菜单',
      extension: {
        tabsSelect: {
          type: 'exPdaTreeSelect',
          name: '选项卡选择',
          value: [],
          hasCheckbox: false,
          treeData: '$getPageModules',
          filter: ['UiPdaTabs'],
        },
        tabsIndex: {
          name: '激活索引',
          type: 'exInputNumber',
          min: 0,
          value: 0,
          tooltip: '激活得标签页得序号,数字0开始计数',
        },
      },
    },
    {
      name: '打开识别框',
      event: 'showIdentifyBox',
      explain: '打开识别框',
      extension: {
        moduleSelect: {
          type: 'exPdaTreeSelect',
          name: '识别框选择',
          value: [],
          hasCheckbox: false,
          treeData: '$getPageModules',
          filter: ['UiPdaIdentifyBox'],
        },
      },
    },
  ],
}
